package com.iqiyi.pps.epg.api.server.iservice;

import com.iqiyi.mams.hedvig.http.mediatype.ExtendedMediaType;

import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;

/**
 * Created by zhang on 2017/6/12.
 */
@Path("/sginal")
@Produces({ExtendedMediaType.APPLICATION_X_THRIFT})
public interface SginalApiService {

    @POST
    @Path("/create")
    @Produces(MediaType.APPLICATION_JSON)
    public String createSginal(@FormParam("entity") String entity);

    @POST
    @Path("/edit")
    @Produces(MediaType.APPLICATION_JSON)
    public String editSginal(@FormParam("entity") String entity);

    @POST
    @Path("/delete")
    @Produces(MediaType.APPLICATION_JSON)
    public String deleteSginal(@FormParam("id") String id);

    @POST
    @Path("/forceDel")
    @Produces(MediaType.APPLICATION_JSON)
    public String forceDeleteSginal(@FormParam("id") String id);

    @POST
    @Path("/start")
    @Produces(MediaType.APPLICATION_JSON)
    public String startSginal(@FormParam("id") String id);

    @POST
    @Path("/stop")
    @Produces(MediaType.APPLICATION_JSON)
    public String stopSginal(@FormParam("id") String id);

    @POST
    @Path("/list")
    @Produces(MediaType.APPLICATION_JSON)
    public String sginalList(@FormParam("pageNo") Integer pageNo,
                             @FormParam("pageSize") Integer pageSize,
                             @FormParam("id") String id,
                             @FormParam("name") String name,
                             @FormParam("port") String port,
                             @FormParam("status") String status,
                             @FormParam("author") String author);

    @POST
    @Path("/server/create")
    @Produces(MediaType.APPLICATION_JSON)
    public String createServer(@FormParam("entity") String entity);

    @POST
    @Path("/server/edit")
    @Produces(MediaType.APPLICATION_JSON)
    public String editServer(@FormParam("entity") String entity);

    @POST
    @Path("/server/delete")
    @Produces(MediaType.APPLICATION_JSON)
    public String deleteServer(@FormParam("id") String id);

    @POST
    @Path("/server/list")
    @Produces(MediaType.APPLICATION_JSON)
    public String serverList(@FormParam("pageNo") Integer pageNo,
                             @FormParam("pageSize") Integer pageSize,
                             @FormParam("id") String id,
                             @FormParam("sn") String sn,
                             @FormParam("insideServerIp") String insideServerIp,
                             @FormParam("outsideServerIp") String outsideServerIp,
                             @FormParam("port") String port,
                             @FormParam("status") String status,
                             @FormParam("serverType") String serverType,
                             @FormParam("province") String province,
                             @FormParam("city") String city,
                             @FormParam("idc") String idc,
                             @FormParam("system") String system,
                             @FormParam("version") String version,
                             @FormParam("hardware") String hardware,
                             @FormParam("load") String load,

                             @FormParam("remark") String remark,
                             @FormParam("dataFree") String dataFree,
                             @FormParam("dataUsed") String dataUsed,
                             @FormParam("allFree") String allFree,
                             @FormParam("allUsed") String allUsed,
                             @FormParam("allMem") String allMem,
                             @FormParam("availableMem") String availableMem,
                             @FormParam("allSwap") String allSwap,
                             @FormParam("freeSwap") String freeSwap,
                             @FormParam("icmploss") String icmploss,
                             @FormParam("monitor") String monitor,

                             @FormParam("including") String including,
                             @FormParam("cluster") String cluster,

                             @FormParam("OrderBy") String orderBy,
                             @FormParam("Sort") String sort);

    @POST
    @Path("/log")
    @Produces(MediaType.APPLICATION_JSON)
    public String sginalLogList(@FormParam("pageNo") Integer pageNo,
                                @FormParam("pageSize") Integer pageSize,
                                @FormParam("fatherId") String fatherId);


    @GET
    @Path("/status")
    @Produces(MediaType.APPLICATION_JSON)
    public String sginalStatus(@QueryParam("cid") String cid,
                               @QueryParam("status") String status);

    @POST
    @Path("/status/list")
    @Produces(MediaType.APPLICATION_JSON)
    public String sginalStatusList(@FormParam("pageNo") Integer pageNo,
                                   @FormParam("pageSize") Integer pageSize,
                                   @FormParam("id") String id,
                                   @FormParam("fatherId") String fatherId,
                                   @FormParam("serverIp") String serverIp,
                                   @FormParam("startDate") String startDate,
                                   @FormParam("endDate") String endDate);

    @POST
    @Path("/server/status/list")
    @Produces(MediaType.APPLICATION_JSON)
    public String serverStatusList(@FormParam("pageNo") Integer pageNo,
                                   @FormParam("pageSize") Integer pageSize,
                                   @FormParam("serverId") String serverId);

    @POST
    @Path("/server/zzdServerList")
    @Produces(MediaType.APPLICATION_JSON)
    public String zzdServerList(@FormParam("paramsObj") String paramsObj,
                            @FormParam("pageNo") Integer pageNo,
                             @FormParam("pageSize") Integer pageSize);
    @POST
    @Path("/server/versionHistory")
    @Produces(MediaType.APPLICATION_JSON)
    public String versionHistory();

    @POST
    @Path("/server/synVersion")
    @Produces(MediaType.APPLICATION_JSON)
    public String synVersion(@FormParam("insideServerIp") String insideServerIp,@FormParam("hardware") String hardware,@FormParam("remark") String remark);

    @POST
    @Path("/server/delVersionController")
    @Produces(MediaType.APPLICATION_JSON)
    public String delVersionController(@FormParam("id") String serverId);

    @POST
    @Path("/server/checkInsideServerIp")
    @Produces(MediaType.APPLICATION_JSON)
    public String checkInsideServerIp(@FormParam("insideServerIp") String insideServerIp);

    @POST
    @Path("/server/getMainVersion")
    @Produces(MediaType.APPLICATION_JSON)
    public String getMainVersion();

    @POST
    @Path("/server/setMainVersion")
    @Produces(MediaType.APPLICATION_JSON)
    public String setMainVersion(@FormParam("versions") String versions);

    @POST
    @Path("/server/synVersionStatus")
    @Produces(MediaType.APPLICATION_JSON)
    public String synVersionStatus(@FormParam("versions") String versions);

    @POST
    @Path("/server/clusterList")
    @Produces(MediaType.APPLICATION_JSON)
    public String clusterList(@FormParam("clusterId") String clusterId,
                              @FormParam("clusterName") String clusterName,
                              @FormParam("status") String status,
                              @FormParam("idc") String idc,
                              @FormParam("pageNo") Integer pageNo,
                              @FormParam("pageSize") Integer pageSize);

    @POST
    @Path("/server/delServerCluster")
    @Produces(MediaType.APPLICATION_JSON)
    public String delServerCluster(@FormParam("id") String id);

    @POST
    @Path("/server/editServerCluster")
    @Produces(MediaType.APPLICATION_JSON)
    public String editServerCluster(@FormParam("id") String clusterId,
                                      @FormParam("name") String clusterName,
                                      @FormParam("status") String status,
                                      @FormParam("serverList") String serverList,
                                      @FormParam("idc") String idc);

    @POST
    @Path("/server/createServerCluster")
    @Produces(MediaType.APPLICATION_JSON)
    public String createServerCluster(
                                      @FormParam("name") String clusterName,
                                      @FormParam("status") String status,
                                      @FormParam("serverList") String serverList,
                                      @FormParam("idc") String idc);

    @POST
    @Path("/server/clusterSeverList")
    @Produces(MediaType.APPLICATION_JSON)
    public String clusterSeverList(@FormParam("cluster") String cluster,
                                   @FormParam("clusterName") String clusterName,
                                   @FormParam("pageNo") Integer pageNo,
                                   @FormParam("pageSize") Integer pageSize);

    @POST
    @Path("/server/idcServerList")
    @Produces(MediaType.APPLICATION_JSON)
    public String IdcServerList(
                                @FormParam("idc") String idc,
                                @FormParam("pageNo") Integer pageNo,
                                @FormParam("pageSize") Integer pageSize);

}
